package com.atguigu.springboot_1.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
//1.实现对象与表的映射
@TableName("user")
public class User implements Serializable {

    //2.指定主键字段  主键自增
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField(value = "name")
    private String name;
    @TableField(value = "age")
    private Integer age;
    //@TableField(value = "sex")
    private String sex;
    //@TableLogic(value="0",delval="1")
    //@TableField(value = "deleted")
    private Boolean deleted;
}
